function login() {
	if ($.trim($("#username").val()).length == 0) {
		alert("用户名不可为空！");
		return true;
	}
	if ($.trim($("#password").val()).length == 0) {
		alert("用户密码不可为空！");
		return true;
	}
	document.forms[0].submit();
}

function EnterLogin() {
	if (event.keyCode == 13) {
		login();
	}
}

function toInputPassword() {
	if (event.keyCode == 13) {
		$("#j_password").focus();
	}
}

$(function() {
	var msg=$("#message").val();
	if(msg.length>0){
		alert(msg);
	}
});

